<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="org.apache.commons.lang.StringUtils"%>
<%@ page language="java" import="java.util.*" %>
<%@ page language="java" import="java.io.*" %>
<%@ page language="java" import="com.tangdi.production.mpapp.utils.WebPayServletUtil" %>
<%@ page language="java" import="com.tangdi.production.mpapp.constants.Key"
	%>
<%!public boolean sceneCheck(String scene) {
		//只支持现场收款与远程收款，其他形式的收款都进入T+1，不需要选择
		if (StringUtils.isEmpty(scene)) {
			return false;
		} else if (Key.SCENE_ON_THE_SPOT.equals(scene)) {
			return true;
		} else if (Key.SCENE_REMOTE.equals(scene)) {
			return true;
		}else if (Key.SCENE_COMPANY.equals(scene)) {
			return true;
		}
		return false;
	}%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	request.setAttribute("on_back", "1");

	WebPayServletUtil payUtil = new WebPayServletUtil();


	String scene = request.getParameter("scene");
	//交易场景无效
	if (!sceneCheck(scene)) {
		payUtil.toIndexPage(request, response);
	}
	
	if (!Key.SCENE_COMPANY.equals(scene)) {
		boolean ok = payUtil.validation(request, response);
		if (!ok) {
			payUtil.toLoginPage(request, response);
		}
	}

	request.setAttribute("title", "收银台");
%>
<!DOCTYPE html>
<html lang="zh">
<head>
<base href="<%=basePath%>">
<title>收银台</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta charset="utf-8" />
<meta name="description" content="Common form elements and layouts" />
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
<%
	out.write("<script type=\"text/javascript\">var scene = '" + scene
			+ "';</script>");
%>
<script type="text/javascript" src="js/jquery-1.7.1.min.js"
	charset="UTF-8"></script>

<script type="text/javascript" src="js/core-1.0.js" charset="UTF-8"></script>
<script type="text/javascript" src="js/user/user-info.js"
	charset="UTF-8"></script>
<script type="text/javascript" src="js/webpay/pay_select.js"
	charset="UTF-8"></script>

<!-- bootstrap & fontawesome -->
<link rel="stylesheet" href="ace_v1.3/assets/css/bootstrap.css" />

<link rel="stylesheet" href="ace_v1.3/assets/css/chosen.css" />
<link rel="stylesheet" href="ace_v1.3/assets/css/font-awesome.css" />

<!-- text fonts -->
<link rel="stylesheet" href="ace_v1.3/assets/css/ace-fonts.css" />

<!-- ace styles -->
<link rel="stylesheet" href="ace_v1.3/assets/css/ace.css"
	class="ace-main-stylesheet" id="main-ace-style" />

<!--[if lte IE 9]>
			<link rel="stylesheet" href="ace_v1.3/assets/css/ace-part2.css" class="ace-main-stylesheet" />
		<![endif]-->

<!--[if lte IE 9]>
		  <link rel="stylesheet" href="ace_v1.3/assets/css/ace-ie.css" />
		<![endif]-->



<!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->

<!--[if lte IE 8]>
		<script src="ace_v1.3/assets/js/html5shiv.js"></script>
		<script src="ace_v1.3/assets/js/respond.js"></script>
		<![endif]-->
<jsp:include page="../plug/head-include.jsp" />
<style type="text/css">
.tradingExplain {
	padding-top: 10px;
}
</style>

<link rel="stylesheet" type="text/css" href="css/webpay/core.1.0.css" />
</head>
<body class="no-skin">
	<!-- #section:basics/navbar.layout -->
	<jsp:include page="../plug/title.jsp" />

	<!-- /section:basics/navbar.layout -->
	<div class="main-container" id="main-container">

		<!-- #section:basics/sidebar -->
		<!-- /section:basics/sidebar -->
		<div class="main-content">
			<div class="main-content-inner">
				<!-- #section:basics/content.breadcrumbs -->
				<!-- /section:basics/content.breadcrumbs -->
				<div class="page-content">
					<!-- #section:settings.box -->
					<!-- <div class="page-header">
						<h1>
							Form Elements <small> <i
								class="ace-icon fa fa-angle-double-right"></i> Common form
								elements and layouts
							</small>
						</h1>
					</div>
					 -->
					<!-- <div class="row">
						<div class="col-xs-12">安徽大智梦信息科技有限公司</div>
					</div> -->

					<div
						class="row-space clear-padding-left clear-padding-right clear-padding-top"></div>

					<form id="scene_form" action="kdpay/createOrder.jsp" method="post">
						<input name="scene" type="hidden" /> <input name="SETTLE_TYPE"
							type="hidden" /> <input name="TRATYP" type="hidden" />
							<input name="BIZTYPE" type="hidden" />
					</form>
					<div class="col-xs-12 space"></div>
					<div class="row" style="display: none;">

							<div 
								class="col-sm-8 col-xs-12 col-sm-offset-2 is-click menu-option menu-T0">
								<div class="ace-icon icon-activates left">
									<img src="images/pay_select.png">
								</div>
								<div class="menu-body clear-padding">
									<div class="col-xs-12 clear-padding">
										<div class="left menu-title"></div>
										<div class="right">
											<div class="left describe">实时结算</div>
											<img src="images/arrow.png" class="arrow">
										</div>
									</div>
								</div>
							</div>

							<div class="col-sm-8 col-xs-12 col-sm-offset-2 align-right"
								style="margin-bottom: 10px;">
								<a href="javascript:void(0)" onclick="openTradingExplain(0)">《交易说明》</a>
							</div>

					</div>

					<div class="row">
						<div
							class="col-sm-8 col-xs-12 col-sm-offset-2 is-click menu-option menu-T1">
							<div class="ace-icon icon-activates left">
								<img src="images/pay_select.png">
							</div>
							<div class="menu-body clear-padding">
								<div class="col-xs-12 clear-padding">
									<div class="left menu-title"></div>
									<div class="right">
										<div class="left describe">T+1结算</div>
										<img src="images/arrow.png" class="arrow">
									</div>
								</div>
							</div>
						</div>

						<div class="col-sm-8 col-xs-12 col-sm-offset-2 align-right">
							<a href="javascript:void(0)" onclick="openTradingExplain(1)">《交易说明》</a>
						</div>
					</div>


					<div class="dialog_list" style="display: none;">
						<!-- 现场支付  T0 -->
						<div id="scene_01_0">
							<div class="tradingExplain">
								<div class="itemdiv dialogdiv">
									<div class="body">
										<div class="name">交易说明</div>
										<!-- <div class="text">单笔交易最高不超过2万元，当天最高累计不超过30万元，最终根据您不同的银行卡限制所决定！</div> -->
										<div class="text">单笔交易最高不超过10000元，当日累计不超过10000元，最终根据您不同的银行卡限制所决定！</div>
									</div>
								</div>
								<div class="itemdiv dialogdiv">
									<div class="body">
										<div class="name">交易时间</div>
										<div class="text">24小时随时交易，由系统自动结算，结算费2元/笔。如因央行系统或其他原因暂停结算，请即时关注系统通知。</div>

									</div>
								</div>
							</div>
						</div>
						<!-- 现场支付  T1 -->
						<div id="scene_01_1">
							<div class="tradingExplain">
								<div class="itemdiv dialogdiv">
									<div class="body">
										<div class="name">交易说明</div>
										<div class="text">单笔交易最高不超过2万元，当日累计不超过30万元，最终根据您不同的银行卡限制所决定！</div>
									</div>
								</div>
								<div class="itemdiv dialogdiv">
									<div class="body">
										<div class="name">交易时间</div>
										<div class="text">周一至周四23:00之前的交易于次日15:00之前结算；23:00之后的交易第二个工作日15:00之前到账；周五、周六、周日发生的交易于周一15:00之前结算到账；结算日为节假日则顺延至节假日后第一个工作日15:00之前结算到账，结算费按3元/笔。</div>

									</div>
								</div>
							</div>
						</div>

						<!-- 远程支付  T0 -->
						<div id="scene_02_0">
							<div class="tradingExplain">
								<div class="itemdiv dialogdiv">
									<div class="body">
										<div class="name">交易说明</div>
										<div class="text">单笔交易最高不超过10000元，当日累计不超过10000元；未进行公安认证商户单笔交易最高不超过2000元，当日累计不超过5000元；最终根据您不同的银行卡限制所决定！</div>
									</div>
								</div>
								<div class="itemdiv dialogdiv">
									<div class="body">
										<div class="name">交易时间</div>
										<div class="text">24小时随时交易，由系统自动结算，结算费2元/笔。如因央行系统或其他原因暂停结算，请即时关注系统通知。</div>

									</div>
								</div>
							</div>
						</div>
						<!-- 远程支付  T1 -->
						<div id="scene_02_1">
							<div class="tradingExplain">
								<div class="itemdiv dialogdiv">
									<div class="body">
										<div class="name">交易说明</div>
										<div class="text">单笔交易最高不超过2万元，当天最高累计不超过30万元，未进行公安认证商户单笔最高不超过5000元，每日累计收款不超过10000元；最终根据您不同的银行卡限制所决定！</div>
									</div>
								</div>
								<div class="itemdiv dialogdiv">
									<div class="body">
										<div class="name">交易时间</div>
										<div class="text">周一至周四23:00之前的交易于次日15:00之前结算；23:00之后的交易第二个工作日15:00之前到账；周五、周六、周日发生的交易于周一15:00之前结算到账；结算日为节假日则顺延至节假日后第一个工作日15:00之前结算到账，结算费按3元/笔。</div>

									</div>
								</div>
							</div>
						</div>
						
						<div id="scene_03_1">
							<div class="tradingExplain">
								<div class="itemdiv dialogdiv">
									<div class="body">
										<div class="name">交易说明</div>
										<div class="text">该功能是针对友汇金融业务收款使用，收款资金将进入友汇金融公司账户，请其他合伙人或商户不要误操作使用此功能！</div>
									</div>
								</div>
							</div>
						</div>
						
						<div id="scene_03_0">
							<div class="tradingExplain">
								<div class="itemdiv dialogdiv">
									<div class="body">
										<div class="name">交易说明</div>
										<div class="text">该功能是针对大智梦旗下潇客平台手机账户充值使用，请提交前仔细核对账号的正确性，充值成功后请及时前往潇客平台核对账户余额变化情况！</div>
									</div>
								</div>
								<div class="itemdiv dialogdiv">
									<div class="body">
										<div class="name">操作指南</div>
										<div class="text">1.输入充值潇客手机账号。潇客手机账号即为您在潇客平台注册的手机登录账号！</div>
										<div class="text">2.输入付款银行绑定手机号。该手机号是您准备使用的支付银行卡所绑定的手机号，用于接收支付链接以及验证码，保证支付的安全性！</div>
										<div class="text">3.输入交易金额。输入您要充值到潇客账号的充值金额！</div>
										<div class="text">4.创建订单。确认信息无误后点击下一步，创建支付订单，同时系统将会发送付款链接到您输入的银行绑定手机号中进行支付！</div>
										<div class="text">5.订单支付。在手机短信中打开您收到的支付链接输入银行卡信息进行支付，如果支付过程中对该笔订单支付失败，请在此返回上一步重新创建充值订单！</div>
										<div class="text">6.支付完成。由于交易是异步完成的，支付完成后点击“重新加载”按钮更新充值状态，状态为成功后前往潇客平台查询余额情况！</div>
									</div>
								</div>
							</div>
						</div>
						
					</div>
					<div class="space-1"></div>

					<div class="row-space clear-padding-left clear-padding-right"></div>

					<div class="col-sm-8 col-xs-12 col-sm-offset-2 space-1"></div>

					<div class="row vip-upgrade-box" style="display: none;">
						<div class="col-sm-8 col-xs-12 col-sm-offset-2 pay_desc">
							<!-- 您当前为普通商户，收款费率统一为2%。升级为VIP商户后可享受T+0收款费率0.7%以及T+1费率0.6%的特权，赶快升级享受更低费率的收款优惠吧! -->
							您当前为普通商户，交易手续费为2%。享受超低费率请升级为VIP商户！
						</div>
						<div class="col-sm-8 col-xs-12 col-sm-offset-2 space-1"></div>
						<div class="clearfix col-sm-8 col-xs-12 col-sm-offset-2">
							<button class="btn btn-info btn-lg btn-block" type="button"
								onclick="toCreateOrder('04','1')">升级为VIP商户</button>
						</div>
					</div>
					
					<div class="row vip-max-box" style="display: none;">
						<!-- <div class="col-sm-8 col-xs-12 col-sm-offset-2 space-1"></div>
						<div class="col-sm-8 col-xs-12 col-sm-offset-2 pay_desc">
							您当前为VIP商户，T+0收款费率0.7%以及T+1费率0.6%，使用手机号作为推荐码并成功推荐3个VIP商户后，您将享受低至0.35%的T+1收款费率，心动您就行动吧！<span style="color: red;">活动截止日期为：2015-07-31</span> 
						</div> -->
					</div>
				</div>
				<!-- /.page-header -->
			</div>
			<!-- /.page-content -->
		</div>
	</div>
	<!-- /.main-content -->

	<!-- /.main-container -->
	<link rel="stylesheet" type="text/css" href="css/dialog.css" />
	<link rel="stylesheet" type="text/css" href="css/webpay/core.1.0.css" />
	<script type="text/javascript" src="js/dialog.js" charset="UTF-8"></script>
	<!-- <script type="text/javascript" src="js/webpay/dial.js" charset="UTF-8"></script>
 -->
	<!-- basic scripts -->
</body>
</html>